<%= form_for(Settings::General.new,
             url: admin_settings_general_settings_path,
             html: { data: { action: "submit->config#updateConfigurationSettings" } }) do |f| %>
  <details class="crayons-card">
    <summary class="crayons-subtitle-2 p-6">Google Analytics and Cookies</summary>
    <div class="p-6 pt-0">
      <fieldset class="grid gap-4">
        <div class="crayons-field">
          <%= admin_config_label :ga_analytics_4_id, "Google Analytics 4 Measurement ID" %>
          <%= admin_config_description Constants::Settings::General.details[:ga_analytics_4_id][:description] %>
          <%= f.text_field :ga_analytics_4_id,
                           class: "crayons-textfield",
                           value: Settings::General.ga_analytics_4_id %>
        </div>
        <div class="crayons-field">
          <%= admin_config_label :cookie_banner_user_context, model: Settings::General %>
          <%= admin_config_description Constants::Settings::General.details[:cookie_banner_user_context][:description] %>
          <%= select_tag "settings_general[cookie_banner_user_context]",
                         options_for_select(Settings::General::BANNER_USER_CONFIGS, Settings::General.cookie_banner_user_context),
                         multiple: false,
                         class: "crayons-select" %>
        </div>
        <div class="crayons-field">
          <%= admin_config_label :coolie_banner_platform_context, model: Settings::General %>
          <%= admin_config_description Constants::Settings::General.details[:coolie_banner_platform_context][:description] %>
          <%= select_tag "settings_general[coolie_banner_platform_context]",
                         options_for_select(Settings::General::BANNER_PLATFORM_CONFIGS, Settings::General.coolie_banner_platform_context),
                         multiple: false,
                         class: "crayons-select" %>
        </div>
      </fieldset>
      <%= render "update_setting_button", f: f %>
    </div>
  </details>
<% end %>
